"""empty message

Revision ID: 74e695302007
Revises: None
Create Date: 2017-03-01 12:21:19.065000

"""

# revision identifiers, used by Alembic.
revision = '74e695302007'
down_revision = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    op.create_table('auth',
                    sa.Column('id', sa.String(length=40), nullable=False),
                    sa.Column('screen_name', sa.String(length=40), nullable=True),
                    sa.Column('head_image', sa.String(length=400), nullable=True),
                    sa.Column('created_at', sa.DateTime(), nullable=True),
                    sa.Column('updated_at', sa.DateTime(), nullable=True),
                    sa.Column('type', sa.String(length=20), nullable=True),
                    sa.Column('first_name', sa.String(length=80), nullable=True),
                    sa.Column('last_name', sa.String(length=80), nullable=True),
                    sa.Column('grade', sa.String(length=8), nullable=True),
                    sa.Column('phone', sa.String(length=20), nullable=True),
                    sa.Column('email', sa.String(length=100), nullable=True),
                    sa.Column('status', sa.String(length=20), nullable=True),
                    sa.PrimaryKeyConstraint('id')
                    )
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('local_auth',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('login_name', sa.String(length=40), nullable=False),
    sa.Column('password', sa.String(length=80), nullable=False),
    sa.Column('retry_count', sa.Integer(), nullable=True),
    sa.Column('auth_id', sa.String(length=100), nullable=True),
    sa.Column('created_at', sa.DateTime(), nullable=True),
    sa.Column('updated_at', sa.DateTime(), nullable=True),
    sa.Column('last_retry_time', sa.DateTime(), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.ForeignKeyConstraint(['auth_id'], ['auth.id'], ),

    )
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('local_auth')
    op.drop_table('auth')
    ### end Alembic commands ###
